#include<stdio.h>
class Point
{
    public:
        void InitP(int x, int y){X = x; Y = y;}
        void Move(int xoffset, int yoffset){X += xoffset; Y += yoffset;}
        int GetX()const{return X;}
        int GetY()const{return Y;}
    private:
        int X, Y;
};
class Rectangle:public Point
{
    public:
        void InitR(int x, int y, int w, int h){
            InitP(x, y);

            W = w;
            H = h;
        }
        void Move(int xoffset, int yoffset){Point::Move(xoffset, yoffset);}
        int GetX()const{return Point::GetX();}
        int GetY()const{return Point::GetY();}
        int GetW()const{return W;}
        int GetH()const{return H;}
    private:
        int W, H;
};
int main(int argc, char *argv[])
{
    Rectangle rect;
    rect.InitR(2, 3, 4, 5);
    printf("x = %d, y = %d, w = %d, h = %d\n", rect.GetX(), rect.GetY(), rect.GetW(), rect.GetH());
    
    return 0;
}
